<extend name="Public/frame" />
<block name="content-box">

    <form class="form-horizontal tpx-ajaxsubmit" role="form" action="{:U(CONTROLLER_NAME.'/'.ACTION_NAME)}"
          method="post">

        <div class="form-group">
            <label class="col-sm-2 control-label"><strong>介绍</strong></label>

            <div class="col-sm-9">
                <div class="help-block">
                    <p>和Wordpress互联之后，有以下特性：</p>
                    <p>1. 系统将不能注册，只允许Wordpress的用户登录；</p>
                    <p>2. 文档可自动同步发布到Wordpress中；</p>
                    <p>3. 本系统和Wordpress系统完全独立，可随时拆分。</p>
                    <p><span style="color:red;">注意：</span>使用Wordpress互联之后，需要配合Wordpress下的Beautymark插件。</p>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">是否开启</label>

            <div class="col-sm-9">
                <div class="radio">
                    <label>
                        <input type="radio" name="wordpress_syncer_enable" value="1" <if condition="$wordpress_syncer_enable">checked</if> /> 开启
                    </label>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <label>
                        <input type="radio" name="wordpress_syncer_enable" value="0" <if condition="!$wordpress_syncer_enable">checked</if> /> 关闭
                    </label>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">数据库主机</label>
            <div class="col-sm-9">
                <input name="wordpress_syncer_db_host"
                       type="text"
                       class="form-control form-inline"
                       value="{$wordpress_syncer_db_host|t_html}" />
                <div class="help-block"></div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">数据库用户</label>
            <div class="col-sm-9">
                <input name="wordpress_syncer_db_user"
                       type="text"
                       class="form-control form-inline"
                       value="{$wordpress_syncer_db_user|t_html}" />
                <div class="help-block"></div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">数据库密码</label>
            <div class="col-sm-9">
                <input name="wordpress_syncer_db_pwd"
                       type="text"
                       class="form-control form-inline"
                       value="{$wordpress_syncer_db_pwd|t_html}" />
                <div class="help-block"></div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">数据库名</label>
            <div class="col-sm-9">
                <input name="wordpress_syncer_db_name"
                       type="text"
                       class="form-control form-inline"
                       value="{$wordpress_syncer_db_name|t_html}" />
                <div class="help-block"></div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">数据表前缀</label>
            <div class="col-sm-9">
                <input name="wordpress_syncer_db_prefix"
                       type="text"
                       class="form-control form-inline"
                       value="{$wordpress_syncer_db_prefix|t_html}" />
                <div class="help-block"></div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">Wordpress预览地址</label>
            <div class="col-sm-9">
                <input name="wordpress_syncer_preview_url"
                       type="text"
                       class="form-control form-inline"
                       value="{$wordpress_syncer_preview_url|t_html}" />
                <div class="help-block">如 http://www.example.com/?p={id} ，文章的ID使用{id}代替</div>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary">{$Think.lang.submit}</button>
            </div>
        </div>

    </form>

</block>